package com.mc.code.mapper;

import com.mc.code.entity.sys.SysMessageManage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 留言管理
 */
@Component
public interface SysMessageMapper {

    //按条件进行查找
    List<SysMessageManage> findMessageByCondition(@Param("messageState") String messageState,
                                                  @Param("currentPage") int currentPage,
                                                  @Param("pageCount") int pageCount
    );

    //获得总页数
    int getTotalPage(@Param("messageState") String messageState);

    //根据id查找留言信息
    SysMessageManage findMessageById(int id);
    //将留言状态改为已读
    int updateState(int id);
    //回复留言，进行更新操作
    int replyMessage(SysMessageManage sysMessageManage);

}
